package src.main.java.com.test;

public class Student {
  private String name;
  private int age;
  private String gender;
  private String id;
  private String phone;
  private String address;
  private String email;
  private String password;
  private double math;
  private double chinese;
  private double english;
  private double total;
  private double average;
  private String rank;

  public Student(String name, int age, String gender, String id, String phone, String address, String email,
      String password, double math, double chinese, double english) {
    this.name = name;
    this.age = age;
    this.gender = gender;
    this.id = id;
    this.phone = phone;
    this.address = address;
    this.email = email;
    this.password = password;
    this.math = math;
    this.chinese = chinese;
    this.english = english;

    double total = chinese + math + english;
    this.setTotal(total);
    this.setAverage(total / 3);
  }

  public Student() {
  }

  public static void main(String[] args) {
    Student s1 = new Student("zhagnsan", 20, "1", "3324", "13333333333", "成都市金牛区", "xxx@qq.com", "xxx", 90, 99, 80);
    // Student s2 = new Student("lisi", 20, "1", "3324", "13333333333", "成都市金牛区",
    // "xxx@qq.com", "xxx", 70, 89, 80);
    // Student s3 = new Student("wangwu", 20, "1", "3324", "13333333333", "成都市金牛区",
    // "xxx@qq.com", "xxx", 60, 67, 77);
    // Student s4 = new Student("zhangsan", 20, "1", "3324", "13333333333",
    // "成都市金牛区", "xxx@qq.com", "xxx", 65, 76, 46);

    System.out.println(s1);
    // System.out.println(s2);
    // System.out.println(s3);
    // System.out.println(s4);
    System.out.println("---------------------------");
    System.out.println(s1.getEnglish());
    System.out.println(s1.getTotal());
    System.out.println(s1.getAverage());

  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public int getAge() {
    return age;
  }

  public void setAge(int age) {
    this.age = age;
  }

  public String getGender() {
    return gender;
  }

  public void setGender(String gender) {
    this.gender = gender;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  @Override
  public String toString() {
    return "Stdents [name=" + name + ", age=" + age + ", gender=" + gender + ", id=" + id + ", phone=" + phone
        + ", address=" + address + ", email=" + email + ", password=" + password + "]";
  }

  public double getMath() {
    return math;
  }

  public void setMath(double math) {
    this.math = math;
  }

  public double getChinese() {
    return chinese;
  }

  public void setChinese(double chinese) {
    this.chinese = chinese;
  }

  public double getEnglish() {
    return english;
  }

  public void setEnglish(double english) {
    this.english = english;
  }

  public double getTotal() {
    return total;
  }

  public void setTotal(double total) {
    this.total = total;
  }

  public double getAverage() {
    return average;
  }

  public void setAverage(double average) {
    this.average = average;
  }

  public String getRank() {
    return rank;
  }

  public void setRank(String rank) {
    this.rank = rank;
  }

}
